home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware City / Developers / CW CDEV Framework / Framework / CDEVClass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-09  |  1.2 KB  |  34 lines  |  [TEXT/MMCC]

  1. #pragma once
  2.  
  3. // Author:         Matthew E. Axsom
  4. // Version:     1.0 - 12/08/94
  5. // Description:    A C++ class for writing cotrol panel's
  6.  
  7. struct cdevObj {
  8.     short        lastItem;        // last system item in control panel.
  9.                 
  10.     DialogPtr    d;                // control panel dialog box
  11.     EventRecord    *e;                // event
  12.     
  13.             cdevObj(short numItems,DialogPtr cp);
  14.     virtual    ~cdevObj(void);
  15.     
  16.     //  processes all events 'cept macDev,initDev,closeDev
  17.     long actions(short message,short itemHit);    
  18.     long commandKey(void);    // handles command key's for non sys7 machines
  19.     
  20.     // you'll need to override these methods w/your own.
  21.     virtual long hit(short itemHit);    // handles a mouse hit in the control panel
  22.     virtual long idle(void);            // handling of nulDev message
  23.     virtual long update(void);            // update user items
  24.     virtual long activate(void);        // activate user items
  25.     virtual long deactivate(void);        // deactivate user items
  26.     virtual long keyDown(void);            // key down was pressed
  27.     virtual long undo(void);            // undo from edit menu or cmd-z
  28.     virtual long cut(void);                // cut from edit menu or cmd-x
  29.     virtual long copy(void);            // copy from edit menu or cmd-c
  30.     virtual long paste(void);            // paste from edit menu or cmd-v
  31.     virtual long clear(void);            // clear from edit menu
  32. };
  33.  
  34.